#include <cstdio>
#include <cstring>

char s1[1005], s2[1005];

int main()
{
    int ans = 0;

    fgets(s1, 1004, stdin);
    fgets(s2, 1004, stdin);

    int len1 = strlen(s1) - 1;   // 取掉换行符
    int len2 = strlen(s2) - 1;

    for(int i = 0; i + len2 - 1 < len1; i++) {
        bool matched = true;

        for(int j = 0; j < len2; j++) {
            if(s1[i+j] != s2[j]) {
                matched = false;
                break;
            } 
        }

        if(matched) {
            ans++;
        }
    }
    
    printf("%d\n", ans);
    return 0;
}

